first ='hello'
last = 'world'

print(''.join([first,last]))
print('-'.join([first,last]))
print('*'.join([first,last]))


print('hello''world')

print('{0}{1}'.format(first,last))


# 字符串去重
str1 = 'hellowaaabbdefdfffffeeefadf'
print(str1)
str2=''
for item in range(0,len(str1)):
    if str1[item] not in str2:
        str2+=str1[item]
print(str2)

for item in str1:
    if item not in str2:
        str2+=item
print(str2)

str3=set()
for item in str1:
    if item not in str3:
        str3.add(item)
lst = list(str3)
lst.sort(key=str1.index) #按照原字符串下标排序
str4 = ''.join(lst)
print(str4)

